{include file="public/header"}
<div class="index_html huanzheliebiao flex_sign">


    {include file="public/nav"}
    <div class="list_box">
        <div class="title">
            <p>患者列表</p>
        </div>

        <div class="new_search_box">
            <div class="new_box">
                <a href="{:url('patient/add_patient')}">
                    <i><img src="__STATIC__/index/imgs/new_btn.png" alt=""></i>
                    <span>新建患者</span>
                </a>
            </div>
        </div>
        <form action="{:url('patient/index')}" method="get" ><!-- 下面是搜索  -->
        <div class="top" style="margin-top: 20px;">



                <!-- 开始日期 -->
                <div class="start_date">
                    <script type="text/javascript">
                        $(function () {
                            $('.end_date_picker').date_input();
                        })
                    </script>
                    <div style="">
                        <input style="border: 1px solid #bbb;font-size: 14px;color: #333;padding: 7px;border-radius: 3px;"
                               type="text" name="start" class="end_date_picker" value="{$search['start']?? ''}" id="start_date">
                    </div>

                </div>
                <!-- 下面截止日期 -->
                <div class="end_date">
                    <script type="text/javascript">
                        $(function () {
                            $('.date_picker').date_input();
                        })
                    </script>
                    <div style=" margin:50px auto; width:500px;">
                        <input style="width:226px;background: #fefefe;border: 1px solid #bbb;font-size: 14px;color: #333;padding: 7px;border-radius: 3px;"
                               type="text" name="end" class="date_picker" value="{$search['end']?? ''}" id="end_date">
                    </div>

                </div>
                <!-- 下面是身份证 -->
                <div class="id_card" style="margin-right: 0px;">
                    <input type="text" name ="name" value="{$search['name']?? ''}" placeholder="查找姓名或者身份证号">
                    <button type="submit" value="搜索" class="sou_btn">搜索</button>
                </div>
              
            

        </div>
        </form>
        <!--  列表的开始 -->
        {if condition="!$list->isEmpty()"}
        <div class="list">
            <div class="top_dec">
                <strong>姓名</strong>
                <strong>性别</strong>
                <strong>身份证号</strong>
                <strong>年龄</strong>
                <strong>检查记录</strong>
                <strong>创建时间</strong>
            </div>
            <ul>
                {foreach $list as $patient}
                <li>
                    <a href="{:url('patient/patient_info',array('pid'=>$patient['id']))}">
							<span class="first">
								<em>{$patient['name']}</em>
							</span>
                        <span>{$patient['sex']|get_sex_str}</span>
                        <span>{$patient['document_num']}</span>
                        <span>{$patient['birth']|getAge}岁</span>
                        <span>共{$patient['record_count']}条检查记录</span>
                        <span>{$patient['create_time']|}</span>
                    </a>
                </li>

                {/foreach}

            </ul>
        </div>
        {include file="public/page" /}

        {else/}
            暂无内容
        {/if}
    </div>
</div>

{include file="public/footer"}
